<!DOCTYPE HTML>
<html>

	<head>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>科创研究成果平台</title>
		<link href="css/main.css" rel="stylesheet" />
		<link href="css/style.css" rel="stylesheet" />
		<link href="../bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
		<script src="../js/jquery-2.1.0.min.js" type="text/javascript"></script>
		<script src="js/jquery.SuperSlide.2.1.1.js"></script>
		<script type="text/javascript" src="../bootstrap/dist/js/bootstrap.js"></script>
		<script src="js/common.js" type="text/javascript"></script>
		<style type="text/css">
		.holy-grail {
		    margin: 0 auto;
		    max-width: 1240px;
		    width: 100%;
		    margin-top: 100px;
		}
		.card2 .card-header {
		    display: -ms-flexbox;
		    display: flex;
		    -ms-flex-align: center;
		    align-items: center;
		    margin: 0;
		    padding-left: 26px;
		    height: 60px;
		    font-size: 20px;
		    font-weight: 700;
		    background-color: #f4f8fd;
		    border-bottom: 1px solid #e9eef2;
		    color: #6e7a81;
		}
		.account-layout-body {
		    display: -ms-flexbox;
		    display: flex;
		}
		.account-navbar-container {
		    width: 180px;
		    min-width: 180px;
		}
		.list {
		    width: 130px;
		}
		.list-header {
		    font-size: 22px;
		    color: #1183f2;
		}
		.list-item {
		    padding-top: 8px;
		    padding-bottom: 8px;
		    font-size: 16px;
		    margin: 5px;
		    border-bottom: 1px solid #eee;
		}
		.list-item a {
		    padding-top: 8px;
		    padding-bottom: 8px;
		    color: #333;
		}
		.account-child-layout {
		    -ms-flex-positive: 1;
		    flex-grow: 1;
		    overflow: hidden;
		    margin-bottom: 50px;
		}
		</style>
	</head>

	<body style="background-color: #fff">
		<!--头部-->
		<header>
			<div class="beijing">
				<h2 style="font-weight:bold;font-size: 18px;">
		<a href="index.html" style="text-decoration : none"><em>
		<font color="white">科创研究成果平台</font></em></a>
		</h2>
				<ul>
					<li>
						<a class="menu_1 " style="text-decoration : none" href="index.html">首页</a>
					</li>
					<li>
						<a class="menu_1 " style="text-decoration : none" href="news.html">资讯<em></em></a>
					</li>
					<li>
						<a class="menu_1 " style="text-decoration : none" href="act.html">活动<em></em></a>
					</li>
					<li>
						<a class="menu_1 " style="text-decoration : none" href="tech.html">技术<em></em></a>
					</li>
					<li>
						<a class="menu_1 " style="text-decoration : none" href="cooper.html">合作<em></em></a>
					</li>
					<li>
						<a class="menu_1 hover" style="text-decoration : none" href="person.html">个人中心<em></em></a>
					</li>
				</ul>
				<div class="clear"></div>
			</div>
			<div class="clear"></div>
		</header>

		<div class="holy-grail">
			<div class="personal-index-container">
				<div class="account-layout-body">
					<div class="account-navbar-container">
						<ul class="list">
							<li class="list-header">
								全部功能
							</li>
							<li class="list-item">
								<a href="person.html" >
									发布的技术
								</a>
							</li>
							<li class="list-item">
								<a href="person_requires.html" class="" >
									发布的需求
								</a>
							</li>
							<li class="list-item">
                                <a href="person_consult.html" style="color: #1183f2;">
                                                                                          咨询的需求
                                </a>
                            </li>
							<li class="list-item">
								<a href="person_act.html" class="">
									报名的活动
								</a>
							</li>
							<li class="list-item">
								<a href="person_sendrequire.html" class="">
									发布新需求
								</a>
							</li>
							<li class="list-item">
								<a href="person_sendtech.html" class="">
									发布新技术
								</a>
							</li>
							<li class="list-item">
								<a href="person_userinfo.html" class="">
									设置
								</a>
							</li>
						</ul>
					</div>
					<div class="technologies-index-container account-create-technologies-container account-child-layout">
						<div class="technology-body">
							<div class="card2 technology-list">
								<h3 class="card-header title">
									咨询的需求
								</h3>
								<div class="card-body" style="margin-top: 20px;">
									<table id="techtable" class="table table-striped">
										<tr>
			                                <td class="">需求名称</td>
			                                <td class="">合作意愿</td>
			                                <td class="">咨询内容</td>
			                                <td class="">操作</td>
			                            </tr>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
            
	</body>

</html>
<script type="text/javascript">
	$(document).ready(function() {
		var userid=getCookie("userid");
        if(userid==''||userid==null){
            //跳转到登录、注册页面
            window.location.href="login.html";
        }
		
		$.ajax({
			url: "/cooperation/selectByUserid/"+userid,
			type: "get",
			dataType: "json",
			success: function(result) {
				console.log(result);
				for(var i = 0; i < result.rows.length; i++) {
					$("table tbody").append(`
							<tr style="font-size:16px">
	                            <td class="">${result.rows[i].requirementName}</td>
	                            <td class="">${result.rows[i].cooperWill}</td>
	                            <td class="">${result.rows[i].consult}</td>
	                            <td class="col-md-1"><a href="cooperdetail.html?id=${result.rows[i].requirementId}">查看详情</a></td>
                            </tr>
                            `);
				}
			}
		});
	})
</script>
